package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * value属性 URL路径映射
 * @author stone
 * @date 2022/06/21 10:03
 */
@Controller
public class HelloController {

    @RequestMapping({"hello","hello2","hello3"})
    @ResponseBody
    public String hello() {
        return "hello world";
    }

    /**
     * 也可以使用通配符 *
     */
    @RequestMapping({"goodbye/*", "goodbye*"})
    @ResponseBody
    public String goodbye() {
        return "byebye";
    }

}
